//
//  UIView+Frame.m
//  01-UIView、UIWindow
//
//  Created by 冀永金 on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
-(void)setYj_x:(CGFloat)yj_x {
    CGRect rect = self.frame;
    rect.origin.x = yj_x;
    self.frame = rect;
}
- (CGFloat)yj_x {
    return self.frame.origin.x;
}
- (void)setYj_y:(CGFloat)yj_y {
    CGRect rect = self.frame;
    rect.origin.y = yj_y;
    self.frame = rect;
}
- (CGFloat)yj_y {
    return self.frame.origin.y;
}

-(void)setYj_width:(CGFloat)yj_width {
    CGRect rect = self.frame;
    rect.size.width = yj_width;
    self.frame = rect;
}
- (CGFloat)yj_width {
    return self.frame.size.width;
}
- (void)setJy_height:(CGFloat)jy_height {
    CGRect rect = self.frame;
    rect.size.height = jy_height;
    self.frame = rect;
    
    
}
- (CGFloat)jy_height {
    return self.frame.size.height;
}
-(void)setYj_centerX:(CGFloat)yj_centerX {
    CGPoint center = self.center;
    center.x = yj_centerX;
    self.center = center;
}
- (CGFloat)yj_centerX {
    return self.center.x;
}
- (void)setYj_centerY:(CGFloat)yj_centerY {
    CGPoint center = self.center;
    center.y = yj_centerY;
    self.center = center;
}
- (CGFloat)yj_centerY {
    return self.center.y;
}
@end
